<template>
  <h1>我是 Hello World</h1>
</template>
<script setup>
import  {  onBeforeUnmount , onUnmounted  } from 'vue'

// 1. 销毁之前
onBeforeUnmount(()=>{
  console.log('onBeforeUnmount');
})
// 2.销毁之后
onUnmounted(()=>{
  console.log('onUnmounted');
})
</script>
